<template>
	<view>
		<!-- 列表 -->
		<view class="list" v-for="(item,index) in lists" :key='index' >
			<!-- //剩余时间，付款，电话 -->
			<view class="time_pay_tel">
				<view class="time_text">
					{{item.back_tinme}}
				</view>
				<view>
					<text class="pay">{{item.status}}</text>
					<text class="icon iconfont" @click="tel(item.phone)">&#xe62c;</text>
				</view>
			</view>
			<!-- 中间今天，用时，服务，价格，二维码 -->
			<view class="list_center">
				<view class="list_center_left">
					<view class="left_text1">
						<text style="margin-right: 15rpx;">{{item.subscribe}}</text>
						<text>{{item.content}}·{{item.people}}人</text>
					</view>
					<view>
						<text class="icon iconfont">&#xe602;</text>
						<text class="pub">服务： </text>
						<text class="pub1">{{item.serve_cont}}</text>
					</view>
					<view>
						<text class="icon iconfont ics">&#xe602;</text>
						<text class="pub">用时：</text>
						<text class="pub1">{{item.able_time}} </text>
					</view>
				</view>
				<view class="list_center_right">
					<view class="code">
						<text class="icon iconfont">&#xe605;</text>
					</view>
					<view class="price">
						<text class="price_text">￥</text>
						<text class="price_text2">{{item.price}}</text>
					</view>
				</view>
			</view>
			<!-- 头像接单次数,取消，立即付款 -->
			<view class="list_bottom">
				<view class="list_bottom_left">
					<view>
						<u-avatar src="https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1194131577,2954769920&fm=26&gp=0.jpg" size='70' show-sex='true'  sex-icon='woman'></u-avatar>
					</view>
					<view style="margin-left: 19rpx;">
						<view class="names">
							<text>{{item.name}}</text>
							<!-- <text>高级美发师</text> -->
						</view>
						<view class="number">
							<text>接单{{item.serve_count}}次 丨</text>
							<text>好评{{item.fraction}}分</text>
						</view>
					</view>
				</view>
				<view>
					<text class="cancel" @click="cancels()">取消</text>
					<text class="yes">立即付款</text>
				</view>
			</view>
		</view>
		
		<!-- //pop弹出层 -->
		<view>
			<uni-popup type="bottom" ref='pops'>
				<view class="pops_box">
					<view class="title">
						取消订单
					</view>
					<view class="message">
						取消后无法回复，优惠券，M币可退回，有效期内使用；两小以上或未确认订单可以免责取消，确认订单并在两小时内取消，将影响	你在平台的信用。                       
					</view>
					<view class="choose_infor">
						<view class="titls">请选择取消订单原因（必选）</view>
						<view class="choose_infor_list" v-for="(item,index) in name_list" :key='index'>
							<view class="choose_name">{{item.name}}</view>
							<view :class="{scrile:true,act:indexs==index}" @click="choose_cont(item,index)">
								<text class="choose_text" v-if="indexs==index">V</text>
							</view>
						</view>
					</view>
					<view class="pop_bottom">
						<text class="zan_cancel" @click="zan_cancel">暂不取消</text>
						<text class="ok_cancel" @click="ok_cancel">确定取消</text>
					</view>
				</view>
			</uni-popup>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				lists:[
					{
						back_tinme:'剩余支付：00:15:00',//剩余时间
						status:'待付款',//状态
						phone:'10086',//电话
						subscribe:'今天11:00',//预约的时间
						content:'洗剪吹',//预约的内容
						people:'1',//预约的人数
						serve_cont:'洗护+修剪+造型',//服务的内容
						able_time:'预计时间1小时',//用时
						price:'260',//服务的价格
						name:'张艺兴｜高级美发师 ',//设计师的名字						
						serve_count:'23',//服务次数
						fraction:'4.9'//服务得分
					},
					{
						back_tinme:'剩余支付：00:30:00',//剩余时间
						status:'待付款',//状态
						phone:'10086',//电话
						subscribe:'明天14:00',//预约的时间
						content:'吹洗',//预约的内容
						people:'1',//预约的人数
						serve_cont:'修手指+造型+护理',//服务的内容
						able_time:'预计时间1.5小时',//用时
						price:'260',//服务的价格
						name:'NICE造型美发沙龙 ',//设计师的名字						
						serve_count:'23',//服务次数
						fraction:'4.9'//服务得分
					},
					{
						back_tinme:'剩余支付：00:30:00',//剩余时间
						status:'待付款',//状态
						phone:'10086',//电话
						subscribe:'明天14:00',//预约的时间
						content:'吹洗',//预约的内容
						people:'1',//预约的人数
						serve_cont:'修手指+造型+护理',//服务的内容
						able_time:'预计时间1.5小时',//用时
						price:'260',//服务的价格
						name:'NICE造型美发沙龙 ',//设计师的名字						
						serve_count:'23',//服务次数
						fraction:'4.9'//服务得分
					},
					],
					name_list:[
						{
							name:'价格有点贵',
							status:0,
							
						},
						{
							name:'时间选择有问题',
							status:1,
							
						},
						{
							name:'我想换一个设计师',
							status:2,
							
						},
						{
							name:'暂时不需要了',
							status:3,
							
						},
						{
							name:'其他',
							status:4,
							
						}
					],
					indexs:0
			}
		},
		methods:{
			//电话拨打
			tel(phone){
				uni.makePhoneCall({
					phoneNumber:phone
				})
			},
			//点击取消按钮
			cancels(){
				this.$refs.pops.open()
			},
			//选择的内容
			choose_cont(item,index){
				this.indexs = index
			},
			//暂不取消
			zan_cancel(){
				this.$refs.pops.close()
			},
			//确定取消
			ok_cancel(){
				this.$refs.pops.close()
			}
		}
	}
</script>
<style>
	
</style>
<style scoped lang="less">
//列表
.list{
	padding: 21rpx 27rpx;	
	box-shadow: 0rpx 2rpx 7rpx 0rpx rgba(113, 113, 113, 0.26);
	background: white;
	padding-bottom: 0;
	margin-bottom: 20rpx;
	//剩余时间，付款，电话
	.time_pay_tel{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1rpx solid #E1E1E1;
		padding-bottom: 10rpx;
		.time_text{			
			font-size: 22rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #00C6C2;
		}
		.pay{			
			font-size: 24rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #8E8E8E;
		}
		.iconfont{
			font-size: 40rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #8E8E8E;
			margin-left: 25rpx;
			display:inline-block;
			transform: translateY(5rpx);
		}
	}
	//中间，时间，服务，用时，二维码，价格
	.list_center{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		border-bottom: 1rpx solid #E1E1E1;
		padding: 27rpx 0rpx;
		.list_center_left{
			.left_text1{				
				height: 29rpx;
				font-size: 30rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #282828;
				line-height: 30rpx;
				margin-bottom: 27rpx;
			}
			.pub{
				
				height: 23rpx;
				font-size: 24rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #414141;
				line-height: 30rpx;
			}
			.pub1{
				height: 23rpx;
				font-size: 24rpx;
				font-family: PingFang;
				
				color: #414141;
				line-height: 30rpx;
			}
			.iconfont{
				color: #00C6C2;
				margin-right: 19rpx;
				
			}
			.ics{
				color: black;
			}
		}
		.list_center_right{
			text-align: center;
			.code{
				.iconfont{
					font-size: 50rpx;
					color: #282828;
				}
			}
			.price{
					margin-top: 46rpx;
					
				.price_text{
					
					font-size: 22rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #000000;
				}
				.price_text2{
				
					font-size: 36rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #000000;
				}
			}
		}
	}
	//底部
	.list_bottom{
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		padding-top: 16rpx;
		padding-bottom: 14rpx;
		.list_bottom_left{
			display: flex;
			.names{		
			
				font-size: 24rpx;
				font-family: PingFang;
				font-weight: bold;
				color: #333333;
				margin-bottom: 16rpx;
			}
			.number{				
				font-size: 18rpx;
				font-family: PingFang;
				font-weight: 500;
				color: #777777;
			}
		}
		.cancel{
			display: inline-block;
			width: 106rpx;
			height: 58rpx;
			border: 1rpx solid #979797;
			border-radius: 4rpx;
			text-align: center;
			line-height: 58rpx;			
			font-size: 26rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #414141;
		}
		.yes{
			display: inline-block;
			width: 141rpx;
			height: 58rpx;
			background: #00C6C2;
			border-radius: 4rpx;
			text-align: center;
			line-height: 58rpx;
			margin-left: 27rpx;
			font-size: 26rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #FFFFFF;
		}
	}
}


//弹出层
.pops_box{
	// height: 779rpx;
	background: white;
	.title{
		padding-top: 34rpx;
		text-align: center;		
		font-size: 30rpx;
		font-family: PingFang;
		font-weight: bold;
		color: #282828;
	}
	.message{		
		margin-top: 23rpx;
		background: #E7E7E7;
		padding: 23rpx 26rpx;		
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 400;
		color: #414141;
		line-height: 32rpx;
	}
	.choose_infor{
		padding: 28rpx 26rpx;
		.titls{			
			font-size: 26rpx;
			font-family: PingFang;
			font-weight: bold;
			color: #000000;
		}
		.choose_infor_list{
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			margin-top: 49rpx;
			.choose_name{					
					font-size: 24rpx;
					font-family: PingFang;
					font-weight: 500;
					color: #414141;
			}
			.scrile{
				width: 30rpx;
				height: 30rpx;
				border: 1rpx solid #414141;
				border-radius: 50%;
				text-align: center;
				line-height: 16rpx;
			}
			.act{
				width: 30rpx;
				height: 30rpx;
				text-align: center;
				line-height: 16rpx;
				border: 1rpx solid #414141;
				border-radius: 50%;
				background: #00C6C2;
			}
			.choose_text{
				// transform: translateY(-10rpx);
				font-size: 20rpx;
				font-family: PingFang;
				font-weight: 500;
				color: white;
			}
		}
	}
	.pop_bottom{
		display: flex;
		justify-content: center;
		padding-bottom: 49rpx;
		padding-top: 49rpx;
		.zan_cancel{
			width: 227rpx;
			height: 67rpx;
			display: inline-block;
			background: #00C6C2;
			text-align: center;
			line-height: 67rpx;			
			font-size: 30rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #FFFFFF;
			border: 1rpx solid #A5A0A0;
		}
		.ok_cancel{
			width: 227rpx;
			height: 67rpx;
			display: inline-block;
			border: 1rpx solid #A5A0A0;
			text-align: center;
			line-height: 67rpx;			
			font-size: 30rpx;
			font-family: PingFang;
			font-weight: 500;
			color: #414141;
		}
	}
}
</style>
